package com.usian.article.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.usian.article.mapper.ArticleUserMapper;
import com.usian.article.service.ArticleUserService;
import com.usian.model.admin.pojos.AdChannel;
import com.usian.model.article.pojos.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.stereotype.Service;

/**
 * ClassName: ArticleUserServiceImpl
 * Author:   WGG
 * Date:    2022-11-2022/11/14-19:39
 * Version: 1.0
 * Description:
 */
@Service
public class ArticleUserServiceImpl extends ServiceImpl<ArticleUserMapper, ApAuthor> implements ArticleUserService {
    @Override
    public ApAuthor getByAuthor(Integer id) {
        LambdaQueryWrapper<ApAuthor> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ApAuthor::getUserId,id);
        ApAuthor apAuthor = getOne(queryWrapper);
        return apAuthor;
    }
}
